Availabilities Page
Overview
The availabilites page is a central management page for all provider availabilities. All CRUD operations on availabilities can be carried out.

Features
1. Business Location Info
The header section includes:
- Back button: navigates user to waitlist dashboard.
- Business name and address
- Search Functionality: Search by provider name (Results are sorted in descending order of slot dtaetime)
- Filtering Options: Filter by All, Active, Completed, or Expired
Add availabilityAction Button: this opens theCustomAvailabilityDrawerwhich enables the clinic admin to an add availabilities for any provider.
2. Availability Data Table (DataTable Component)
- The Availability table displays the availabilities of the provider: Each table row shows the following:
- Date Time: Formatted via
formatDateToUTC. - Status: Rendered using
StatusChipcomponent. - Accepted By: Patient info rendered using
TablePatientcomponent. - Notifications Sent: count of notification sent out from.
- Action Column: Includes:
- View notifications: when clicked, we fetch all notifications sent out for that partitcular availability
- Edit: when clicked, it opens the
CustomAvailabilityDrawer, prefills the availability details and allows for edits. - Delete: When triggered, makes a request to remove that availability from the database. This also closes out any open notification for the availability.
- Clicking a table row opens
CustomViewEntityDrawerwith the selected provider availability data.
- Date Time: Formatted via
3. Pagination
The Paginate Component is used to:
- Set how many availabilites to return per page using the Select options
- Navigate between pages using the
previousandnextbuttons
SSE (Server-Sent Events)
The page subscribes to real-time updates via useSSE custom hook, listening to:
- Availability Events: Triggers
availabilityRefetch()